export interface IProductBase {
  /** 商品ID */
  id: string;
  /** 商品名称 */
  title: string;
  /** 商品价格 */
  price: number;
  /** 商品数量 */
  count: number;
  /** 商品描述 */
  remark: string;
  /** 商品归属 */
  belongId: string;
  /** 扩展属性 */
  resource: string;
  /** 创建用户 */
  createUser: string;
  /** 更新用户 */
  updateUser: string;
  /** 创建时间 */
  createTime: string;
  /** 更新时间 */
  updateTime: string;
}

export class ProductBase implements IProductBase {
  id: string;
  title: string;
  price: number;
  count: number;
  remark: string;
  belongId: string;
  resource: string;
  createUser: string;
  updateUser: string;
  createTime: string;
  updateTime: string;

  constructor(product: IProductBase) {
    this.id = product.id;
    this.title = product.title;
    this.price = product.price;
    this.count = product.count;
    this.remark = product.remark;
    this.belongId = product.belongId;
    this.resource = product.resource;
    this.createUser = product.createUser;
    this.updateUser = product.updateUser;
    this.createTime = product.createTime;
    this.updateTime = product.updateTime;
  }
}
